import React from "react";
import {
	Chart,
	Axis,
	Coordinate,
	Interval
} from "bizcharts";

class Basic extends React.Component {
	render() {
        console.log(this.props)
        const data = this.props.chartProps
		data.sort((a, b) => a.population - b.population)
        const scale = {
            sas_grade:{
              alias:'云安全中心评分' // 别名
            },
        };

		return (
            <div>
                <Chart height={300} data={data} scale={scale} autoFit>
				<Coordinate transpose />
				<Interval position="name*sas_grade" label="sas_grade"/>
                <Axis name="sas_grade" title />
			    </Chart>
            </div>
		);
	}
}

export default Basic
